home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / QuickTime VR / MacOS / QuickDraw™ 3D 1.0.6F4 SDK / Development / 3DMF parser / 0.9 version / MFMEMORY.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-24  |  1.0 KB  |  44 lines  |  [TEXT/MPS ]

  1. #ifndef MF3D_MEMORY_H
  2. #define    MF3D_MEMORY_H
  3. /*==============================================================================
  4.  *
  5.  *    File:        MFMEMORY.H
  6.  *
  7.  *    Function:    Memory allocation routines.
  8.  *
  9.  *    Author(s):    Rick Wong (RWW)
  10.  *
  11.  *    Copyright:    (c) 1995 by Apple Computer, Inc., all rights reserved.
  12.  *
  13.  *    Change History (most recent first):
  14.  *        Fabio    Changed file name to 8 characters
  15.  *        F3L_RWW    File created.
  16.  *==============================================================================
  17.  */
  18. #if defined(__COMPILING_ON_MACINTOSH__)
  19. #pragma once
  20. #endif
  21.  
  22. #if defined(DEBUG) && DEBUG > 1
  23. #include <stdio.h>
  24. #endif
  25. #include <stdlib.h>
  26.  
  27. #if defined(DEBUG) && DEBUG > 1
  28. #if !defined(MF3D_MEMORY_C)
  29. int gMallocCount = 0;
  30. #else
  31. extern int gMallocCount;
  32. #endif
  33. #endif
  34.  
  35. void *MF3D_Malloc(size_t size);
  36. void *MF3D_Realloc(void *ptr, size_t size);
  37. void MF3D_Free(void *ptr);
  38.  
  39. #if !defined(MF3D_MEMORY_C) && defined(DEBUG) && DEBUG > 1
  40. #define MF3D_Malloc(x)    (printf("File \"%s\"; Line %d\n", __FILE__, __LINE__), MF3D_Malloc(x))
  41. #endif
  42.  
  43. #endif
  44.